<template>
    <h3>事件修饰符</h3>
    <!-- //通过在click后面加，来阻止默认事件发生 -->
    <a @click.prevent="printLog" href="https://www.baidu.com/">百度一下你就知道</a>
    <div @click="clickEvent1">
        <p @click.stop="clickEvent2">点击显示</p>
    </div>
    
</template>
<script>
export default {
    data() {
        return {
            
        }
    },
    methods: {
       
        printLog(e) {
            console.log("百度");
        },
        clickEvent1(e) {
            console.log("Div");
        },
        clickEvent2(e) {

            console.log("P");
        }
    }
}
</script>
